import request from '@/utils/request'

export function getCourseCommentList(courseId, query) {
  return request({
    url: `/courses/${courseId}/comments`,
    method: 'get',
    params: query
  })
}

export function createReply(courseId, data) {
  return request({
    url: `/courses/${courseId}/comments`,
    method: 'post',
    data
  })
}

export function updateReply(courseId, data) {
  return request({
    url: `/courses/${courseId}/comments`,
    method: 'put',
    data
  })
}

export function updateCommentStatus(courseId, cId, data) {
  return request({
    url: `/courses/${courseId}/comments/${cId}/updateStatus`,
    method: 'post',
    data
  })
}
